package org.springblade.modules.ad.controller;

import org.springblade.modules.ad.entity.AdGroup;
import org.springblade.modules.ad.entity.AdOU;
import org.springblade.modules.ad.service.AdGroupService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 域组 controller
 * @ClassName AdGroupController.java
 * @version 1.0.0
 * @author zhangyunjiao
 * @createTime 2021/8/26
 */

@RestController
@RequestMapping("/blade-test")
public class AdGroupController {

	@Resource
	private AdGroupService addAdGroup;


	/**
	 * 添加域组
	 * @param group
	 */
	@RequestMapping(value = "/addAdGroup",method = RequestMethod.POST)
	public void addAdGroup(@RequestBody AdOU group){
		addAdGroup.addAdGroup(group);
	}


	/**
	 * 用户添加到域组中
	 * @param adGroup
	 */
	@RequestMapping(value = "/addUserToGroup",method = RequestMethod.POST)
	public void addUserToGroup(@RequestBody AdGroup adGroup){
		//addAdGroup.addUserToGroup(adGroup);
	}


//	/**
//	 * 用户从域组中移除
//	 * @param group
//	 * @param username
//	 */
//	@RequestMapping(value = "/removeUserToGroup",method = RequestMethod.POST)
//	public void removeUserToGroup(@RequestParam String group, @RequestParam String username){
//		addAdGroup.removeUserToGroup(group,username);
//	}

}
